﻿CREATE TABLE [dbo].[Mark]
(
    [MarkId] [uniqueidentifier] DEFAULT newid() NOT NULL,

    [ResponsibleParticipant] [uniqueidentifier] NULL, -- FK to Participant
    [NextParticipant] [uniqueidentifier] NULL, -- FK to Participant

	[Activity] [uniqueidentifier] NULL, -- FK to Activity
	[Model] [uniqueidentifier] NOT NULL, -- FK to Model

    [Name] [nvarchar](max) NOT NULL,
	[Tag] [nvarchar](max) NULL,
	[DueDate] [datetime] NULL,
    [Weight] [int] DEFAULT 1 NOT NULL,
    [IsActive] [bit] DEFAULT 0 NOT NULL,
    [DateSet] [datetime] NULL,
    [CreatedBy] [uniqueidentifier] NOT NULL, -- FK to Person
    [IsDeleted] [bit] DEFAULT 0 NOT NULL,
	[CreatedOn] [datetime] DEFAULT getdate() NOT NULL,
    [LastChanged] [datetime] DEFAULT getdate() NOT NULL,
	[LastChangedBy] [uniqueidentifier] NOT NULL, -- FK to Person
	[TimeStamp] [timestamp] NOT NULL

CONSTRAINT [PK_Mark] PRIMARY KEY CLUSTERED
(
    [MarkId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO